package com.TPNexus.model;

import java.util.ArrayList;
import java.util.List;

import javax.enterprise.context.SessionScoped;
import java.io.Serializable;

@SessionScoped
public class PurchaseOrder implements Serializable {

	private static final long serialVersionUID = 8597078385498896917L;
	private long poid;
	private String purchaseorderdocno;
	private User author;
	private User seller;
	private String status;
	private List<PurchaseOrderLineItem> polineitems=new ArrayList<PurchaseOrderLineItem>();
	private PurchaseOrder fatherpo;

	public long getPoid() {
		return poid;
	}

	public void setPoid(long poid) {
		this.poid = poid;
	}

	public String getPurchaseorderdocno() {
		return purchaseorderdocno;
	}

	public void setPurchaseorderdocno(String purchaseorderdocno) {
		this.purchaseorderdocno = purchaseorderdocno;
	}

	public User getAuthor() {
		return author;
	}

	public void setAuthor(User author) {
		this.author = author;
	}

	public User getSeller() {
		return seller;
	}

	public void setSeller(User seller) {
		this.seller = seller;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public List<PurchaseOrderLineItem> getPolineitems() {
		return polineitems;
	}

	public void setPolineitems(List<PurchaseOrderLineItem> polineitems) {
		this.polineitems = polineitems;
	}

	public PurchaseOrder(long poid, String purchaseorderdocno, User author,
			User seller, String status,
			List<PurchaseOrderLineItem> polineitems) {
		super();
		this.poid = poid;
		this.purchaseorderdocno = purchaseorderdocno;
		this.author = author;
		this.seller = seller;
		this.status = status;
		this.polineitems = polineitems;
	}

	public PurchaseOrder() {

	}

	public PurchaseOrder getFatherpo() {
		return fatherpo;
	}

	public void setFatherpo(PurchaseOrder fatherpo) {
		this.fatherpo = fatherpo;
	}

}
